package com.solution.admin.order.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.solution.admin.order.dao.OrderProductDeliveredDao;
import com.solution.admin.order.entity.OrderProductDeliveredEntity;
import com.solution.common.dao.impl.BaseDaoImpl;
import com.solution.common.page.PageBean;
import com.solution.common.page.PageParam;

/**
 * 已发货商品DAO实现
 * @author lilp
 * @date 2017-09-18 22:58:13
 */
@Repository
public class OrderProductDeliveredDaoImpl extends BaseDaoImpl<OrderProductDeliveredEntity> implements OrderProductDeliveredDao {

	/**
	 * 保存已发货商品信息
	 * @param orderProductDeliveredEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:58:13
	 */
	@Override
	public long saveOrderProductDelivered(OrderProductDeliveredEntity orderProductDeliveredEntity) {
		return super.insert(orderProductDeliveredEntity);
	}

	/**
	 * 分页查询已发货商品信息
	 * @param pageParam 分页对象
	 * @param orderProductDelivered 分页参数
	 * @return PageBean 分页参数及数据
	 * @author lilp
	 * @date 2017-09-18 22:58:13
	 */
	public PageBean listOrderProductDeliveredPage(PageParam pageParam, Map<String, Object> param) {
		return super.listPage(pageParam, param);
	}

	/**
	 * 更新已发货商品
	 * @param orderProductDeliveredEntity
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:58:13
	 */
	@Override
	public int updateOrderProductDelivered(OrderProductDeliveredEntity orderProductDeliveredEntity) {
		return super.update(orderProductDeliveredEntity);
	}

	/**
	 * 删除已发货商品
	 * @param orderProductDeliveredId
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:58:13
	 */
	public int deleteOrderProductDeliveredById( Long id) {
		return super.deleteById(id);
	}
	
	/**
	 * 根据条件查询已发货商品
	 * @param param
	 * @return
	 * @author lilp
	 * @date 2017-09-18 22:58:13
	 */
	@Override
	public List<OrderProductDeliveredEntity> listOrderProductDelivered( Map<String, Object> param) {
		return super.listBy(param);
	}
}
